/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package peggame;

/**
 *
 * @author zach
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        int[][] board={ {1,1,1,1,1,1,1,1,1,1,1,1},
                        {1,0,1,1,0,1,0,0,1,1,0,1},
                        {1,0,1,0,0,1,1,0,0,0,0,1},
                        {1,0,1,1,0,1,1,1,0,1,0,1},
                        {0,0,0,1,0,0,0,0,0,1,0,1},
                        {1,0,1,0,0,1,0,1,1,0,0,1},
                        {1,0,1,0,1,0,0,0,1,0,1,1},
                        {1,0,0,0,1,0,1,1,0,0,0,0},
                        {1,1,1,1,1,1,1,1,1,1,1,1} };
        int startx=0;
        int starty=0;
        int endx=0;
        int endy=0;

        char[] index=new char[Sum(board)];
        int next_index=1;
        for(int i=0;i<index.length;i++){
            index[i]=(char)next_index;
        }

        pegmanager pm=new pegmanager(board,index,startx,starty,endx,endy);
        MoveChecker mc=new MoveChecker(pm);

       // for(Move i:mc.moves)
       //     System.out.println(i);
        new Driver(pm,mc);
    }
    private static int Sum(int[][] in){
        int out=0;
        for(int[] i:in)
            out+=i.length;
        return out;
    }
   

}
